package com.mtsmda.oracleOfficialTutorialJAVA7.chapter1.nestedClasses;

public class InnerNonStaticClass {
	private String a = "a";
	String b = "b";
	protected String c = "c";
	public String d = "d";
	
	private static int count = 0;
	
	class InnerClass{
		private String a = "a";
		String b = "b";
		protected String c = "c";
		public String d = "d";
		
//		static int count = 0;
		
//		public static void go(){
//			System.out.println();
//		}
		
		public void print(){
			System.out.println("-- Inner non static class --");
			System.out.println(this.a);
			System.out.println(this.b);
			System.out.println(this.c);
			System.out.println(this.d);
			
			System.out.println(InnerNonStaticClass.count);
			
			System.out.println(new InnerNonStaticClass().a);
			System.out.println(new InnerNonStaticClass().b);
			System.out.println(new InnerNonStaticClass().c);
			System.out.println(new InnerNonStaticClass().d);
			System.out.println("-----");
		}
	}
	
	public void print(){
		System.out.println("-- Outer non static class --");
		System.out.println(this.a);
		System.out.println(this.b);
		System.out.println(this.c);
		System.out.println(this.d);
		
		System.out.println(this.new InnerClass().a);
		System.out.println(this.new InnerClass().b);
		System.out.println(this.new InnerClass().c);
		System.out.println(this.new InnerClass().d);
		System.out.println("-----");
	}
	
}